"use strict";
// 第13节: 面向对象编程-继承和重写
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
// 类的继承
// 父类
var JSpang = /** @class */ (function () {
    function JSpang(name, age, skill) {
        this.name = name;
        this.age = age;
        this.skill = skill;
    }
    ;
    JSpang.prototype.interest = function () {
        console.log(this.name + '找小姐姐');
    };
    return JSpang;
}());
var jspangObj = new JSpang('技术胖', 20, 'web');
jspangObj.interest();
// 子类继承 extends  和类方法重写
// 他不仅完全继承了我的基因，还增加了帅气的属性和赚钱的本领
var JSshuai = /** @class */ (function (_super) {
    __extends(JSshuai, _super);
    function JSshuai() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.zhangxiang = '帅气';
        return _this;
    }
    JSshuai.prototype.interest = function () {
        // super.interest() //super关键字调用了父类的方法, 相当于父类的方法在这里跑，并且实现技能增加
        console.log('建立电商平台');
    };
    JSshuai.prototype.zhuangqiang = function () {
        console.log('一天赚一个亿');
    };
    return JSshuai;
}(JSpang));
var JSshuaiObj = new JSshuai('技术帅', 4, '演讲');
console.log(JSshuaiObj);
JSshuaiObj.interest();
JSshuaiObj.zhuangqiang();
